'''
    内部urls
'''
from django.conf.urls import url
from .wzyUserService import userService
from .wzyProjectService import project, group
from .wzyTestPlanService import testPlan
from .wzyEmailService import email
from .wzyReportService import report
from .wzyTestCaseService import testCase
from .wzyImplementService import interface,publicInterface
from .utilService import upload

urlpatterns = [
    # 用户接口
    url(r'login$', userService.loginView.as_view()),  # 登陆接口
    url(r'addAlterUser', userService.addAlterUser),  # 新增/修改用户
    url(r'getUserData', userService.getUserData),  # 获取单个用户信息
    url(r'testAPI', userService.testAPI),  # 获取单个用户信息
    url(r'getAllUserdata', userService.getAllUserdata),  # 获取所有用户信息
    url(r'deleteUserdata', userService.deleteUserdata),  # 删除用户信息

    # 项目接口
    url(r'addProject', project.addProject),  # Project#项目接口
    url(r'getProject', project.getProject),

    # 分组接口
    url(r'addGroup', group.addGroup),  # 添加分组
    url(r'getGroup', group.getGroup),  # 获取所有分组信息
    url(r'updateGroup', group.updateGroup),  # 更新分组信息
    url(r'deleteGroup', group.deleteGroup),  # 删除分组信息，删除前判断该分组是否有接口使用

    # 测试计划
    url(r'getDetailCasereQuest', testPlan.getDetailCasereQuest),  #
    url(r'addTestPlan', testPlan.addTestPlan),  #
    url(r'deleteTestPlan', testPlan.deleteTestPlan),  #
    url(r'getDetailTestcase', testPlan.getDetailTestcase),  #
    url(r'queryTestPlan', testPlan.queryTestPlan),  #
    url(r'executetTestPlan', testPlan.executetTestPlan),  #

    # 发送邮件
    url(r'getAllEmail', email.getAllEmail),  #
    url(r'addEmail', email.addEmail),  #
    url(r'sendEmail', email.sendEmail),  #

    # 报告
    url(r'getReportPlan', report.getReportPlan),  # 获取报告条数
    url(r'getReportCase', report.getReportCase),  # 获取报告信息

    #测试用例
    url(r'addCase', testCase.addCase),
    url(r'getRequesRelatecase', testCase.getRequesRelatecase),
    url(r'getRelatecaseData', testCase.getRelatecaseData),
    url(r'getSingleCase', testCase.getSingleCase),
    url(r'deleteCase', testCase.deleteCase),
    url(r'checkCasePoint', testCase.checkCasePoint), # 检查点
    url(r'checkCase', testCase.checkCase), # 检查用例
    url(r'getTestDB', testCase.getTestDB), # 获取测试数据库
    url(r'getSqlresultValue', testCase.getSqlresultValue),

    url(r'getHeaders', testCase.getHeaders),
    url(r'assertionCase', testCase.assertionCase),
    url(r'executionCase', testCase.executionCase),
    url(r'copyCurrentCase', testCase.copyCurrentCase),

    # 接口管理
    url(r'addInterface', interface.addInterface),
    url(r'getInterface', interface.getInterface),
    url(r'updateInterface', interface.updateInterface),
    url(r'deleteInterface', interface.deleteInterface),
    url(r'getRequest', interface.getRequest),

    # 公共接口管理
    url(r'addPublicInterface', publicInterface.addPublicInterface),
    url(r'queryPublicInterface', publicInterface.queryPublicInterface),
    url(r'getPublicInterface', publicInterface.getPublicInterface),
    url(r'runPublicInterface', publicInterface.runPublicInterface),
    url(r'delPublicInterface', publicInterface.delPublicInterface),

    # 上传
    url(r'get_token', upload.get_token),




]
